<?php

namespace App\Observers;

use App\Handlers\KeysHandler;
use Illuminate\Support\Facades\Cache;

class BannerObserver
{
    public function saved()
    {
        foreach (config('app.locale_list') as $value) {
            Cache::forget(sprintf(KeysHandler::BANNER, $value, 0));
        }
    }

    public function deleted()
    {
        foreach (config('app.locale_list') as $value) {
            Cache::forget(sprintf(KeysHandler::BANNER, $value, 0));
        }
    }
}
